import java.util.Scanner;
//获取一个数二进制序列中所有的偶数位和奇数位， 分别输出二进制序列
public class everybit {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("输入一个整数：");
        int n=scan.nextInt();
        System.out.print("奇数位：");
        for (int i = 31; i >=1 ; i-=2) {
            System.out.print(((n>>i)&1)+" ");
        }
        System.out.println();
        System.out.print("偶数位：");
        for (int i = 30; i >=0 ; i-=2) {
            System.out.print(((n>>i)&1)+" ");
        }
    }
}
